using System;
using System.Web;
using Castle.Windsor;
using log4net.Config;

namespace Tickets.WebUI
{
	public class Global : HttpApplication, IContainerAccessor
	{

		protected void Application_Start(object sender, EventArgs e)
		{
			XmlConfigurator.Configure();
			ServiceLocator.Initialize();
		}

		protected void Application_End(object sender, EventArgs e)
		{
			ServiceLocator.Dispose();
		}

		#region IContainerAccessor Members
		// La implementacion de esta interfaz es necesaria para algunos HTTPModules de
		// Castle y algunas facilities
		public IWindsorContainer Container
		{
			get { return ServiceLocator.Container; }
		}
		#endregion

	}
}